package org.fisco.bcos.sdk.demo.contract;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.fisco.bcos.sdk.v3.client.Client;
import org.fisco.bcos.sdk.v3.codec.datatypes.Address;
import org.fisco.bcos.sdk.v3.codec.datatypes.Bool;
import org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray;
import org.fisco.bcos.sdk.v3.codec.datatypes.DynamicStruct;
import org.fisco.bcos.sdk.v3.codec.datatypes.Event;
import org.fisco.bcos.sdk.v3.codec.datatypes.Function;
import org.fisco.bcos.sdk.v3.codec.datatypes.Type;
import org.fisco.bcos.sdk.v3.codec.datatypes.TypeReference;
import org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String;
import org.fisco.bcos.sdk.v3.codec.datatypes.generated.Uint16;
import org.fisco.bcos.sdk.v3.codec.datatypes.generated.Uint256;
import org.fisco.bcos.sdk.v3.codec.datatypes.generated.tuples.generated.Tuple2;
import org.fisco.bcos.sdk.v3.codec.datatypes.generated.tuples.generated.Tuple4;
import org.fisco.bcos.sdk.v3.codec.datatypes.generated.tuples.generated.Tuple6;
import org.fisco.bcos.sdk.v3.contract.Contract;
import org.fisco.bcos.sdk.v3.crypto.CryptoSuite;
import org.fisco.bcos.sdk.v3.crypto.keypair.CryptoKeyPair;
import org.fisco.bcos.sdk.v3.model.CryptoType;
import org.fisco.bcos.sdk.v3.model.TransactionReceipt;
import org.fisco.bcos.sdk.v3.model.callback.CallCallback;
import org.fisco.bcos.sdk.v3.model.callback.TransactionCallback;
import org.fisco.bcos.sdk.v3.transaction.model.exception.ContractException;

@SuppressWarnings("unchecked")
public class WeIdContract extends Contract {
    public static final String[] BINARY_ARRAY = {
        "608060405234801561001057600080fd5b5061152a806100206000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063640b5f0e11610066578063640b5f0e146101385780638b14fefb14610149578063a0d721b614610174578063cddf7bf114610187578063ee7e335f1461019a57600080fd5b8063170abf9c146100a35780631ca3c60f146100cb57806334aa7dab146100e057806355ea6c4714610100578063635ef5a514610125575b600080fd5b6100b66100b1366004610f68565b6101ba565b60405190151581526020015b60405180910390f35b6100de6100d93660046110e0565b61020c565b005b6100f36100ee366004610f68565b610422565b6040516100c291906111c6565b61011361010e366004610f68565b61058e565b6040516100c29695949392919061127e565b6100de6101333660046110e0565b610913565b6001546040519081526020016100c2565b61015c6101573660046112ea565b610aef565b6040516001600160a01b0390911681526020016100c2565b6100b6610182366004610f68565b610b19565b6100de610195366004611303565b610b5a565b6101ad6101a836600461133f565b610cc1565b6040516100c29190611361565b60006001600160a01b038216158015906101f757506001600160a01b038216600090815260208190526040902080546101f2906113ae565b151590505b1561020457506001919050565b506000919050565b610215846101ba565b61023a5760405162461bcd60e51b8152600401610231906113e9565b60405180910390fd5b336001600160a01b038516146102a35760405162461bcd60e51b815260206004820152602860248201527f6f6e6c792074686520636f6e74726f6c6c65722063616e2075706461746520646044820152676f63756d656e742160c01b6064820152608401610231565b6001600160a01b0384166000908152602081905260409020600281015460ff16156103105760405162461bcd60e51b815260206004820152601f60248201527f74686973207765696420686173206265656e20646561637469766174656421006044820152606401610231565b83516103259060018301906020870190610e00565b50600281018054610100900461ffff169060016103418361142a565b91906101000a81548161ffff021916908361ffff1602179055505082600080876001600160a01b03166001600160a01b031681526020019081526020016000206003019080519060200190610397929190610e84565b506001600160a01b03851660009081526020818152604090912083516103c592600490920191850190610e84565b50846001600160a01b03167fae4a904069590d1fd69ecb55d5a4ff631e8918baeec817a9676871ded52ea724858360020160019054906101000a900461ffff1660405161041392919061144c565b60405180910390a25050505050565b600060205280600052604060002060009150905080600001604051806080016040529081600082018054610455906113ae565b80601f0160208091040260200160405190810160405280929190818152602001828054610481906113ae565b80156104ce5780601f106104a3576101008083540402835291602001916104ce565b820191906000526020600020905b8154815290600101906020018083116104b157829003601f168201915b505050505081526020016001820180546104e7906113ae565b80601f0160208091040260200160405190810160405280929190818152602001828054610513906113ae565b80156105605780601f1061053557610100808354040283529160200191610560565b820191906000526020600020905b81548152906001019060200180831161054357829003601f168201915b50505091835250506002919091015460ff811615156020830152610100900461ffff16604090910152905081565b6060806000806060806105a0876101ba565b6105bc5760405162461bcd60e51b8152600401610231906113e9565b6001600160a01b0387166000908152602081905260408082208151608081019092528054829082906105ed906113ae565b80601f0160208091040260200160405190810160405280929190818152602001828054610619906113ae565b80156106665780601f1061063b57610100808354040283529160200191610666565b820191906000526020600020905b81548152906001019060200180831161064957829003601f168201915b5050505050815260200160018201805461067f906113ae565b80601f01602080910402602001604051908101604052809291908181526020018280546106ab906113ae565b80156106f85780601f106106cd576101008083540402835291602001916106f8565b820191906000526020600020905b8154815290600101906020018083116106db57829003601f168201915b50505091835250506002919091015460ff8116151560208084019190915261010090910461ffff166040928301528251838201518484015160608601516001600160a01b038f1660009081528086528681206003810180548951818a0281018a01909a52808a52999a509598949793969295946004909101939285929084015b82821015610824578382906000526020600020018054610797906113ae565b80601f01602080910402602001604051908101604052809291908181526020018280546107c3906113ae565b80156108105780601f106107e557610100808354040283529160200191610810565b820191906000526020600020905b8154815290600101906020018083116107f357829003601f168201915b505050505081526020019060010190610778565b50505050915080805480602002602001604051908101604052809291908181526020016000905b828210156108f757838290600052602060002001805461086a906113ae565b80601f0160208091040260200160405190810160405280929190818152602001828054610896906113ae565b80156108e35780601f106108b8576101008083540402835291602001916108e3565b820191906000526020600020905b8154815290600101906020018083116108c657829003601f168201915b50505050508152602001906001019061084b565b5050505090509650965096509650965096505091939550919395565b61091c846101ba565b156109595760405162461bcd60e51b815260206004820152600d60248201526c7765696420657869737465642160981b6044820152606401610231565b6040805160808101825284815260208082018690526000828401819052600160608401526001600160a01b03881681528082529290922081518051929384936109a59284920190610e00565b5060208281015180516109be9260018501920190610e00565b506040828101516002909201805460609094015161ffff166101000262ffff00199315159390931662ffffff1990941693909317919091179091556001600160a01b038616600090815260208181529190208451610a2492600390920191860190610e84565b506001600160a01b0385166000908152602081815260409091208351610a5292600490920191850190610e84565b506001546040516001600160a01b038716917f225796d6d2320ae197dfa518b711a28ff7950a059793e235c5d643eafc3677e391610a91918891611472565b60405180910390a250506001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0394909416939093179092555050565b60018181548110610aff57600080fd5b6000918252602090912001546001600160a01b0316905081565b60006001600160a01b038216158015906101f757506001600160a01b03821660009081526020819052604090206002015460ff161561020457506001919050565b610b63826101ba565b610b7f5760405162461bcd60e51b8152600401610231906113e9565b336001600160a01b03831614610be35760405162461bcd60e51b815260206004820152602360248201527f6f6e6c792074686520636f6e74726f6c6c65722063616e20646561637469766160448201526274652160e81b6064820152608401610231565b6001600160a01b0382166000908152602081905260409020600281015460ff1615158215151415610c6b5760405162461bcd60e51b815260206004820152602c60248201527f74686973207765696420686173206265656e206465616374697661746564206f60448201526b72206163746976617465642160a01b6064820152608401610231565b60028101805460ff19168315159081179091556040519081526001600160a01b038416907f6373c0ba32a1036cdad769b2c88d58704ed09357c4402821d43df17af796cfc59060200160405180910390a2505050565b6060828210158015610cd4575060015482105b610d165760405162461bcd60e51b8152602060048201526013602482015272706172616d732061726520696e76616c69642160681b6044820152606401610231565b6000610d228484611494565b610d2d9060016114ab565b905060008167ffffffffffffffff811115610d4a57610d4a610f8a565b604051908082528060200260200182016040528015610d73578160200160208202803683370190505b50905060005b82811015610df7576001610d8d82886114ab565b81548110610d9d57610d9d6114c3565b9060005260206000200160009054906101000a90046001600160a01b0316828281518110610dcd57610dcd6114c3565b6001600160a01b039092166020928302919091019091015280610def816114d9565b915050610d79565b50949350505050565b828054610e0c906113ae565b90600052602060002090601f016020900481019282610e2e5760008555610e74565b82601f10610e4757805160ff1916838001178555610e74565b82800160010185558215610e74579182015b82811115610e74578251825591602001919060010190610e59565b50610e80929150610edd565b5090565b828054828255906000526020600020908101928215610ed1579160200282015b82811115610ed15782518051610ec1918491602090910190610e00565b5091602001919060010190610ea4565b50610e80929150610ef2565b5b80821115610e805760008155600101610ede565b80821115610e80576000610f068282610f0f565b50600101610ef2565b508054610f1b906113ae565b6000825580601f10610f2b575050565b601f016020900490600052602060002090810190610f499190610edd565b50565b80356001600160a01b0381168114610f6357600080fd5b919050565b600060208284031215610f7a57600080fd5b610f8382610f4c565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610fc957610fc9610f8a565b604052919050565b600082601f830112610fe2576000",
        "80fd5b813567ffffffffffffffff811115610ffc57610ffc610f8a565b61100f601f8201601f1916602001610fa0565b81815284602083860101111561102457600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261105257600080fd5b8135602067ffffffffffffffff8083111561106f5761106f610f8a565b8260051b61107e838201610fa0565b938452858101830193838101908886111561109857600080fd5b84880192505b858310156110d4578235848111156110b65760008081fd5b6110c48a87838c0101610fd1565b835250918401919084019061109e565b98975050505050505050565b600080600080608085870312156110f657600080fd5b6110ff85610f4c565b9350602085013567ffffffffffffffff8082111561111c57600080fd5b61112888838901610fd1565b9450604087013591508082111561113e57600080fd5b61114a88838901611041565b9350606087013591508082111561116057600080fd5b5061116d87828801611041565b91505092959194509250565b6000815180845260005b8181101561119f57602081850181015186830182015201611183565b818111156111b1576000602083870101525b50601f01601f19169290920160200192915050565b6020815260008251608060208401526111e260a0840182611179565b90506020840151601f198483030160408501526111ff8282611179565b91505060408401511515606084015261ffff60608501511660808401528091505092915050565b600082825180855260208086019550808260051b84010181860160005b8481101561127157601f1986840301895261125f838351611179565b98840198925090830190600101611243565b5090979650505050505050565b60c08152600061129160c0830189611179565b82810360208401526112a38189611179565b9050861515604084015261ffff8616606084015282810360808401526112c98186611226565b905082810360a08401526112dd8185611226565b9998505050505050505050565b6000602082840312156112fc57600080fd5b5035919050565b6000806040838503121561131657600080fd5b61131f83610f4c565b91506020830135801515811461133457600080fd5b809150509250929050565b6000806040838503121561135257600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156113a25783516001600160a01b03168352928401929184019160010161137d565b50909695505050505050565b600181811c908216806113c257607f821691505b602082108114156113e357634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526011908201527077656964206e6f7420657869737465642160781b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600061ffff8083168181141561144257611442611414565b6001019392505050565b60408152600061145f6040830185611179565b905061ffff831660208301529392505050565b6040815260006114856040830185611179565b90508260208301529392505050565b6000828210156114a6576114a6611414565b500390565b600082198211156114be576114be611414565b500190565b634e487b7160e01b600052603260045260246000fd5b60006000198214156114ed576114ed611414565b506001019056fea2646970667358221220f1dd077633a5c536d4d5879674284e3ced76d16eff32eef4094aa74ba545aaef64736f6c634300080b0033"
    };

    public static final String BINARY =
            org.fisco.bcos.sdk.v3.utils.StringUtils.joinAll("", BINARY_ARRAY);

    public static final String[] SM_BINARY_ARRAY = {
        "608060405234801561001057600080fd5b50611534806100206000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80637c05de31116100665780637c05de31146101455780637d4e5e2814610158578063a1d9c0e114610178578063a3cfd7e81461018b578063c2004f781461019e57600080fd5b80633362f91d146100a357806335a03ff7146100d157806360dd20ff146100e257806362a693a0146101055780636c063cc91461011a575b600080fd5b6100b66100b1366004610f75565b6101be565b6040516100c896959493929190611039565b60405180910390f35b6001546040519081526020016100c8565b6100f56100f0366004610f75565b61054d565b60405190151581526020016100c8565b6101186101133660046110a5565b61059f565b005b61012d6101283660046110e1565b610709565b6040516001600160a01b0390911681526020016100c8565b610118610153366004611250565b610733565b61016b610166366004610f75565b610943565b6040516100c891906112e9565b610118610186366004611250565b610aaf565b6100f5610199366004610f75565b610c8c565b6101b16101ac366004611349565b610ccd565b6040516100c8919061136b565b6060806000806060806101d08761054d565b6101f657604051636381e58960e11b81526004016101ed906113b8565b60405180910390fd5b6001600160a01b038716600090815260208190526040808220815160808101909252805482908290610227906113e3565b80601f0160208091040260200160405190810160405280929190818152602001828054610253906113e3565b80156102a05780601f10610275576101008083540402835291602001916102a0565b820191906000526020600020905b81548152906001019060200180831161028357829003601f168201915b505050505081526020016001820180546102b9906113e3565b80601f01602080910402602001604051908101604052809291908181526020018280546102e5906113e3565b80156103325780601f1061030757610100808354040283529160200191610332565b820191906000526020600020905b81548152906001019060200180831161031557829003601f168201915b50505091835250506002919091015460ff8116151560208084019190915261010090910461ffff166040928301528251838201518484015160608601516001600160a01b038f1660009081528086528681206003810180548951818a0281018a01909a52808a52999a509598949793969295946004909101939285929084015b8282101561045e5783829060005260206000200180546103d1906113e3565b80601f01602080910402602001604051908101604052809291908181526020018280546103fd906113e3565b801561044a5780601f1061041f5761010080835404028352916020019161044a565b820191906000526020600020905b81548152906001019060200180831161042d57829003601f168201915b5050505050815260200190600101906103b2565b50505050915080805480602002602001604051908101604052809291908181526020016000905b828210156105315783829060005260206000200180546104a4906113e3565b80601f01602080910402602001604051908101604052809291908181526020018280546104d0906113e3565b801561051d5780601f106104f25761010080835404028352916020019161051d565b820191906000526020600020905b81548152906001019060200180831161050057829003601f168201915b505050505081526020019060010190610485565b5050505090509650965096509650965096505091939550919395565b60006001600160a01b0382161580159061058a57506001600160a01b03821660009081526020819052604090208054610585906113e3565b151590505b1561059757506001919050565b506000919050565b6105a88261054d565b6105c557604051636381e58960e11b81526004016101ed906113b8565b336001600160a01b0383161461062a57604051636381e58960e11b815260206004820152602360248201527f6f6e6c792074686520636f6e74726f6c6c65722063616e20646561637469766160448201526274652160e81b60648201526084016101ed565b6001600160a01b0382166000908152602081905260409020600281015460ff16151582151514156106b357604051636381e58960e11b815260206004820152602c60248201527f74686973207765696420686173206265656e206465616374697661746564206f60448201526b72206163746976617465642160a01b60648201526084016101ed565b60028101805460ff19168315159081179091556040519081526001600160a01b038416907f5fdf7ee254ec77b1984fe05e8a0d27e3661cbb09acb2c7cd5f39337f542f2fbb9060200160405180910390a2505050565b6001818154811061071957600080fd5b6000918252602090912001546001600160a01b0316905081565b61073c8461054d565b61075957604051636381e58960e11b81526004016101ed906113b8565b336001600160a01b038516146107c357604051636381e58960e11b815260206004820152602860248201527f6f6e6c792074686520636f6e74726f6c6c65722063616e2075706461746520646044820152676f63756d656e742160c01b60648201526084016101ed565b6001600160a01b0384166000908152602081905260409020600281015460ff161561083157604051636381e58960e11b815260206004820152601f60248201527f74686973207765696420686173206265656e206465616374697661746564210060448201526064016101ed565b83516108469060018301906020870190610e0d565b50600281018054610100900461ffff1690600161086283611434565b91906101000a81548161ffff021916908361ffff1602179055505082600080876001600160a01b03166001600160a01b0316815260200190815260200160002060030190805190602001906108b8929190610e91565b506001600160a01b03851660009081526020818152604090912083516108e692600490920191850190610e91565b50846001600160a01b03167faa98843d5a397d4be8a9aa1b1ae60bdd2408e0bdb5e83cd58e3ebf0b99a14857858360020160019054906101000a900461ffff16604051610934929190611456565b60405180910390a25050505050565b600060205280600052604060002060009150905080600001604051806080016040529081600082018054610976906113e3565b80601f01602080910402602001604051908101604052809291908181526020018280546109a2906113e3565b80156109ef5780601f106109c4576101008083540402835291602001916109ef565b820191906000526020600020905b8154815290600101906020018083116109d257829003601f168201915b50505050508152602001600182018054610a08906113e3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a34906113e3565b8015610a815780601f10610a5657610100808354040283529160200191610a81565b820191906000526020600020905b815481529060010190602001808311610a6457829003601f168201915b50505091835250506002919091015460ff811615156020830152610100900461ffff16604090910152905081565b610ab88461054d565b15610af657604051636381e58960e11b815260206004820152600d60248201526c7765696420657869737465642160981b60448201526064016101ed565b6040805160808101825284815260208082018690526000828401819052600160608401526001600160a01b0388168152808252929092208151805192938493610b429284920190610e0d565b506020828101518051610b5b9260018501920190610e0d565b506040828101516002909201805460609094015161ffff166101000262ffff00199315159390931662ffffff1990941693909317919091179091556001600160a01b038616600090815260208181529190208451610bc192600390920191860190610e91565b506001600160a01b0385166000908152602081815260409091208351610bef92600490920191850190610e91565b506001546040516001600160a01b038716917f5d50107aeb9e27f96e16ac3c97664ef1c2cdb8212bd26036bfdcf894adfe4f2991610c2e91889161147c565b60405180910390a250506001805480820182556000919091527f801412028db4471413ca17a15806a4f6857ca4e7c2783885b524c92c7efcdc980180546001600160a01b0319166001600160a01b0394909416939093179092555050565b60006001600160a01b0382161580159061058a57506001600160a01b03821660009081526020819052604090206002015460ff161561059757506001919050565b6060828210158015610ce0575060015482105b610d2357604051636381e58960e11b8152602060048201526013602482015272706172616d732061726520696e76616c69642160681b60448201526064016101ed565b6000610d2f848461149e565b610d3a9060016114b5565b905060008167ffffffffffffffff811115610d5757610d576110fa565b604051908082528060200260200182016040528015610d80578160200160208202803683370190505b50905060005b82811015610e04576001610d9a82886114b5565b81548110610daa57610daa6114cd565b9060005260206000200160009054906101000a90046001600160a01b0316828281518110610dda57610dda6114cd565b6001600160a01b039092166020928302919091019091015280610dfc816114e3565b915050610d86565b50949350505050565b828054610e19906113e3565b90600052602060002090601f016020900481019282610e3b5760008555610e81565b82601f10610e5457805160ff1916838001178555610e81565b82800160010185558215610e81579182015b82811115610e81578251825591602001919060010190610e66565b50610e8d929150610eea565b5090565b828054828255906000526020600020908101928215610ede579160200282015b82811115610ede5782518051610ece918491602090910190610e0d565b5091602001919060010190610eb1565b50610e8d929150610eff565b5b80821115610e8d5760008155600101610eeb565b80821115610e8d576000610f138282610f1c565b50600101610eff565b508054610f28906113e3565b6000825580601f10610f38575050565b601f016020900490600052602060002090810190610f569190610eea565b50565b80356001600160a01b0381168114610f7057600080fd5b919050565b600060208284031215610f8757600080fd5b610f9082610f59565b9392505050565b6000815180845260005b81811015610fbd57602081850181015186830182015201610fa1565b81811115610fcf576000602083870101525b50601f01601f19169290920160200192",
        "915050565b600081518084526020808501808196508360051b8101915082860160005b8581101561102c57828403895261101a848351610f97565b98850198935090840190600101611002565b5091979650505050505050565b60c08152600061104c60c0830189610f97565b828103602084015261105e8189610f97565b9050861515604084015261ffff8616606084015282810360808401526110848186610fe4565b905082810360a08401526110988185610fe4565b9998505050505050505050565b600080604083850312156110b857600080fd5b6110c183610f59565b9150602083013580151581146110d657600080fd5b809150509250929050565b6000602082840312156110f357600080fd5b5035919050565b63b95aa35560e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611139576111396110fa565b604052919050565b600082601f83011261115257600080fd5b813567ffffffffffffffff81111561116c5761116c6110fa565b61117f601f8201601f1916602001611110565b81815284602083860101111561119457600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126111c257600080fd5b8135602067ffffffffffffffff808311156111df576111df6110fa565b8260051b6111ee838201611110565b938452858101830193838101908886111561120857600080fd5b84880192505b85831015611244578235848111156112265760008081fd5b6112348a87838c0101611141565b835250918401919084019061120e565b98975050505050505050565b6000806000806080858703121561126657600080fd5b61126f85610f59565b9350602085013567ffffffffffffffff8082111561128c57600080fd5b61129888838901611141565b945060408701359150808211156112ae57600080fd5b6112ba888389016111b1565b935060608701359150808211156112d057600080fd5b506112dd878288016111b1565b91505092959194509250565b60208152600082516080602084015261130560a0840182610f97565b90506020840151601f198483030160408501526113228282610f97565b91505060408401511515606084015261ffff60608501511660808401528091505092915050565b6000806040838503121561135c57600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156113ac5783516001600160a01b031683529284019291840191600101611387565b50909695505050505050565b60208082526011908201527077656964206e6f7420657869737465642160781b604082015260600190565b600181811c908216806113f757607f821691505b602082108114156114185763b95aa35560e01b600052602260045260246000fd5b50919050565b63b95aa35560e01b600052601160045260246000fd5b600061ffff8083168181141561144c5761144c61141e565b6001019392505050565b6040815260006114696040830185610f97565b905061ffff831660208301529392505050565b60408152600061148f6040830185610f97565b90508260208301529392505050565b6000828210156114b0576114b061141e565b500390565b600082198211156114c8576114c861141e565b500190565b63b95aa35560e01b600052603260045260246000fd5b60006000198214156114f7576114f761141e565b506001019056fea2646970667358221220bca1ef52c41cbd4fa5c40a35bdfe22b331646db726258c59e0923a3c4f3215b364736f6c634300080b0033"
    };

    public static final String SM_BINARY =
            org.fisco.bcos.sdk.v3.utils.StringUtils.joinAll("", SM_BINARY_ARRAY);

    public static final String[] ABI_ARRAY = {
        "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"created\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"CreateWeId\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"deactivated\",\"type\":\"bool\"}],\"name\":\"DeactivateWeId\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"updated\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"versionId\",\"type\":\"uint16\"}],\"name\":\"UpdateWeId\",\"type\":\"event\"},{\"conflictFields\":[{\"kind\":0},{\"kind\":4,\"value\":[1]}],\"inputs\":[{\"internalType\":\"address\",\"name\":\"identity\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"created\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"authentication\",\"type\":\"string[]\"},{\"internalType\":\"string[]\",\"name\":\"service\",\"type\":\"string[]\"}],\"name\":\"createWeId\",\"outputs\":[],\"selector\":[1667167653,2715402465],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"conflictFields\":[{\"kind\":0}],\"inputs\":[{\"internalType\":\"address\",\"name\":\"identity\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"deactivated\",\"type\":\"bool\"}],\"name\":\"deactivateWeId\",\"outputs\":[],\"selector\":[3453975537,1655083936],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"conflictFields\":[{\"kind\":0},{\"kind\":4,\"value\":[1]}],\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"first\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"last\",\"type\":\"uint256\"}],\"name\":\"getWeId\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"selector\":[4001248095,3254800248],\"stateMutability\":\"view\",\"type\":\"function\"},{\"conflictFields\":[{\"kind\":4,\"value\":[1]}],\"inputs\":[],\"name\":\"getWeIdCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"selector\":[1678466830,899694583],\"stateMutability\":\"view\",\"type\":\"function\"},{\"conflictFields\":[{\"kind\":0}],\"inputs\":[{\"internalType\":\"address\",\"name\":\"identity\",\"type\":\"address\"}],\"name\":\"isDeactivated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"selector\":[2698453430,2748307432],\"stateMutability\":\"view\",\"type\":\"function\"},{\"conflictFields\":[{\"kind\":0}],\"inputs\":[{\"internalType\":\"address\",\"name\":\"identity\",\"type\":\"address\"}],\"name\":\"isIdentityExist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"selector\":[386580380,1625104639],\"stateMutability\":\"view\",\"type\":\"function\"},{\"conflictFields\":[{\"kind\":0}],\"inputs\":[{\"internalType\":\"address\",\"name\":\"identity\",\"type\":\"address\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"created\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"updated\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"deactivated\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"versionId\",\"type\":\"uint16\"},{\"internalType\":\"string[]\",\"name\":\"authentication\",\"type\":\"string[]\"},{\"internalType\":\"string[]\",\"name\":\"service\",\"type\":\"string[]\"}],\"selector\":[1441426503,862124317],\"stateMutability\":\"view\",\"type\":\"function\"},{\"conflictFields\":[{\"kind\":0}],\"inputs\":[{\"internalType\":\"address\",\"name\":\"identity\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"updated\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"authentication\",\"type\":\"string[]\"},{\"internalType\":\"string[]\",\"name\":\"service\",\"type\":\"string[]\"}],\"name\":\"updateWeId\",\"outputs\":[],\"selector\":[480495119,2080759345],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"conflictFields\":[{\"kind\":0},{\"kind\":3,\"slot\":0,\"value\":[0]}],\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"weidDocuments\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"created\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"updated\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"deactivated\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"versionId\",\"type\":\"uint16\"}],\"internalType\":\"struct MetaData\",\"name\":\"metaData\",\"type\":\"tuple\"}],\"selector\":[883588523,2102287912],\"stateMutability\":\"view\",\"type\":\"function\"},{\"conflictFields\":[{\"kind\":3,\"slot\":1,\"value\":[0]},{\"kind\":4,\"value\":[1]}],\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"weids\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"selector\":[2333409019,1812348105],\"stateMutability\":\"view\",\"type\":\"function\"}]"
    };

    public static final String ABI = org.fisco.bcos.sdk.v3.utils.StringUtils.joinAll("", ABI_ARRAY);

    public static final String FUNC_CREATEWEID = "createWeId";

    public static final String FUNC_DEACTIVATEWEID = "deactivateWeId";

    public static final String FUNC_GETWEID = "getWeId";

    public static final String FUNC_GETWEIDCOUNT = "getWeIdCount";

    public static final String FUNC_ISDEACTIVATED = "isDeactivated";

    public static final String FUNC_ISIDENTITYEXIST = "isIdentityExist";

    public static final String FUNC_RESOLVE = "resolve";

    public static final String FUNC_UPDATEWEID = "updateWeId";

    public static final String FUNC_WEIDDOCUMENTS = "weidDocuments";

    public static final String FUNC_WEIDS = "weids";

    public static final Event CREATEWEID_EVENT =
            new Event(
                    "CreateWeId",
                    Arrays.<TypeReference<?>>asList(
                            new TypeReference<Address>(true) {},
                            new TypeReference<Utf8String>() {},
                            new TypeReference<Uint256>() {}));;

    public static final Event DEACTIVATEWEID_EVENT =
            new Event(
                    "DeactivateWeId",
                    Arrays.<TypeReference<?>>asList(
                            new TypeReference<Address>(true) {}, new TypeReference<Bool>() {}));;

    public static final Event UPDATEWEID_EVENT =
            new Event(
                    "UpdateWeId",
                    Arrays.<TypeReference<?>>asList(
                            new TypeReference<Address>(true) {},
                            new TypeReference<Utf8String>() {},
                            new TypeReference<Uint16>() {}));;

    protected WeIdContract(String contractAddress, Client client, CryptoKeyPair credential) {
        super(getBinary(client.getCryptoSuite()), contractAddress, client, credential);
    }

    public static String getBinary(CryptoSuite cryptoSuite) {
        return (cryptoSuite.getCryptoTypeConfig() == CryptoType.ECDSA_TYPE ? BINARY : SM_BINARY);
    }

    public static String getABI() {
        return ABI;
    }

    public List<CreateWeIdEventResponse> getCreateWeIdEvents(
            TransactionReceipt transactionReceipt) {
        List<Contract.EventValuesWithLog> valueList =
                extractEventParametersWithLog(CREATEWEID_EVENT, transactionReceipt);
        ArrayList<CreateWeIdEventResponse> responses =
                new ArrayList<CreateWeIdEventResponse>(valueList.size());
        for (Contract.EventValuesWithLog eventValues : valueList) {
            CreateWeIdEventResponse typedResponse = new CreateWeIdEventResponse();
            typedResponse.log = eventValues.getLog();
            typedResponse.owner = (String) eventValues.getIndexedValues().get(0).getValue();
            typedResponse.created = (String) eventValues.getNonIndexedValues().get(0).getValue();
            typedResponse.index = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue();
            responses.add(typedResponse);
        }
        return responses;
    }

    public List<DeactivateWeIdEventResponse> getDeactivateWeIdEvents(
            TransactionReceipt transactionReceipt) {
        List<Contract.EventValuesWithLog> valueList =
                extractEventParametersWithLog(DEACTIVATEWEID_EVENT, transactionReceipt);
        ArrayList<DeactivateWeIdEventResponse> responses =
                new ArrayList<DeactivateWeIdEventResponse>(valueList.size());
        for (Contract.EventValuesWithLog eventValues : valueList) {
            DeactivateWeIdEventResponse typedResponse = new DeactivateWeIdEventResponse();
            typedResponse.log = eventValues.getLog();
            typedResponse.owner = (String) eventValues.getIndexedValues().get(0).getValue();
            typedResponse.deactivated =
                    (Boolean) eventValues.getNonIndexedValues().get(0).getValue();
            responses.add(typedResponse);
        }
        return responses;
    }

    public List<UpdateWeIdEventResponse> getUpdateWeIdEvents(
            TransactionReceipt transactionReceipt) {
        List<Contract.EventValuesWithLog> valueList =
                extractEventParametersWithLog(UPDATEWEID_EVENT, transactionReceipt);
        ArrayList<UpdateWeIdEventResponse> responses =
                new ArrayList<UpdateWeIdEventResponse>(valueList.size());
        for (Contract.EventValuesWithLog eventValues : valueList) {
            UpdateWeIdEventResponse typedResponse = new UpdateWeIdEventResponse();
            typedResponse.log = eventValues.getLog();
            typedResponse.owner = (String) eventValues.getIndexedValues().get(0).getValue();
            typedResponse.updated = (String) eventValues.getNonIndexedValues().get(0).getValue();
            typedResponse.versionId =
                    (BigInteger) eventValues.getNonIndexedValues().get(1).getValue();
            responses.add(typedResponse);
        }
        return responses;
    }

    public TransactionReceipt createWeId(
            String identity, String created, List<String> authentication, List<String> service) {
        final Function function =
                new Function(
                        FUNC_CREATEWEID,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String(created),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray<
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String>(
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String.class,
                                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(
                                                authentication,
                                                org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String
                                                        .class)),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray<
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String>(
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String.class,
                                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(
                                                service,
                                                org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String
                                                        .class))),
                        Collections.<TypeReference<?>>emptyList(),
                        0);
        return executeTransaction(function);
    }

    public String createWeId(
            String identity,
            String created,
            List<String> authentication,
            List<String> service,
            TransactionCallback callback) {
        final Function function =
                new Function(
                        FUNC_CREATEWEID,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String(created),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray<
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String>(
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String.class,
                                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(
                                                authentication,
                                                org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String
                                                        .class)),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray<
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String>(
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String.class,
                                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(
                                                service,
                                                org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String
                                                        .class))),
                        Collections.<TypeReference<?>>emptyList(),
                        0);
        return asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForCreateWeId(
            String identity, String created, List<String> authentication, List<String> service) {
        final Function function =
                new Function(
                        FUNC_CREATEWEID,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String(created),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray<
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String>(
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String.class,
                                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(
                                                authentication,
                                                org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String
                                                        .class)),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray<
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String>(
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String.class,
                                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(
                                                service,
                                                org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String
                                                        .class))),
                        Collections.<TypeReference<?>>emptyList(),
                        0);
        return createSignedTransaction(function);
    }

    public Tuple4<String, String, List<String>, List<String>> getCreateWeIdInput(
            TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function =
                new Function(
                        FUNC_CREATEWEID,
                        Arrays.<Type>asList(),
                        Arrays.<TypeReference<?>>asList(
                                new TypeReference<Address>() {},
                                new TypeReference<Utf8String>() {},
                                new TypeReference<DynamicArray<Utf8String>>() {},
                                new TypeReference<DynamicArray<Utf8String>>() {}));
        List<Type> results =
                this.functionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple4<String, String, List<String>, List<String>>(
                (String) results.get(0).getValue(),
                (String) results.get(1).getValue(),
                convertToNative((List<Utf8String>) results.get(2).getValue()),
                convertToNative((List<Utf8String>) results.get(3).getValue()));
    }

    public TransactionReceipt deactivateWeId(String identity, Boolean deactivated) {
        final Function function =
                new Function(
                        FUNC_DEACTIVATEWEID,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Bool(deactivated)),
                        Collections.<TypeReference<?>>emptyList(),
                        0);
        return executeTransaction(function);
    }

    public String deactivateWeId(
            String identity, Boolean deactivated, TransactionCallback callback) {
        final Function function =
                new Function(
                        FUNC_DEACTIVATEWEID,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Bool(deactivated)),
                        Collections.<TypeReference<?>>emptyList(),
                        0);
        return asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForDeactivateWeId(String identity, Boolean deactivated) {
        final Function function =
                new Function(
                        FUNC_DEACTIVATEWEID,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Bool(deactivated)),
                        Collections.<TypeReference<?>>emptyList(),
                        0);
        return createSignedTransaction(function);
    }

    public Tuple2<String, Boolean> getDeactivateWeIdInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function =
                new Function(
                        FUNC_DEACTIVATEWEID,
                        Arrays.<Type>asList(),
                        Arrays.<TypeReference<?>>asList(
                                new TypeReference<Address>() {}, new TypeReference<Bool>() {}));
        List<Type> results =
                this.functionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple2<String, Boolean>(
                (String) results.get(0).getValue(), (Boolean) results.get(1).getValue());
    }

    public List getWeId(BigInteger first, BigInteger last) throws ContractException {
        final Function function =
                new Function(
                        FUNC_GETWEID,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.generated.Uint256(first),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.generated.Uint256(last)),
                        Arrays.<TypeReference<?>>asList(
                                new TypeReference<DynamicArray<Address>>() {}));
        List<Type> result = (List<Type>) executeCallWithSingleValueReturn(function, List.class);
        return convertToNative(result);
    }

    public void getWeId(BigInteger first, BigInteger last, CallCallback callback)
            throws ContractException {
        final Function function =
                new Function(
                        FUNC_GETWEID,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.generated.Uint256(first),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.generated.Uint256(last)),
                        Arrays.<TypeReference<?>>asList(
                                new TypeReference<DynamicArray<Address>>() {}));
        asyncExecuteCall(function, callback);
    }

    public BigInteger getWeIdCount() throws ContractException {
        final Function function =
                new Function(
                        FUNC_GETWEIDCOUNT,
                        Arrays.<Type>asList(),
                        Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));
        return executeCallWithSingleValueReturn(function, BigInteger.class);
    }

    public void getWeIdCount(CallCallback callback) throws ContractException {
        final Function function =
                new Function(
                        FUNC_GETWEIDCOUNT,
                        Arrays.<Type>asList(),
                        Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));
        asyncExecuteCall(function, callback);
    }

    public Boolean isDeactivated(String identity) throws ContractException {
        final Function function =
                new Function(
                        FUNC_ISDEACTIVATED,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity)),
                        Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
        return executeCallWithSingleValueReturn(function, Boolean.class);
    }

    public void isDeactivated(String identity, CallCallback callback) throws ContractException {
        final Function function =
                new Function(
                        FUNC_ISDEACTIVATED,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity)),
                        Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
        asyncExecuteCall(function, callback);
    }

    public Boolean isIdentityExist(String identity) throws ContractException {
        final Function function =
                new Function(
                        FUNC_ISIDENTITYEXIST,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity)),
                        Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
        return executeCallWithSingleValueReturn(function, Boolean.class);
    }

    public void isIdentityExist(String identity, CallCallback callback) throws ContractException {
        final Function function =
                new Function(
                        FUNC_ISIDENTITYEXIST,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity)),
                        Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
        asyncExecuteCall(function, callback);
    }

    public Tuple6<String, String, Boolean, BigInteger, List<String>, List<String>> resolve(
            String identity) throws ContractException {
        final Function function =
                new Function(
                        FUNC_RESOLVE,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity)),
                        Arrays.<TypeReference<?>>asList(
                                new TypeReference<Utf8String>() {},
                                new TypeReference<Utf8String>() {},
                                new TypeReference<Bool>() {},
                                new TypeReference<Uint16>() {},
                                new TypeReference<DynamicArray<Utf8String>>() {},
                                new TypeReference<DynamicArray<Utf8String>>() {}));
        List<Type> results = executeCallWithMultipleValueReturn(function);
        return new Tuple6<String, String, Boolean, BigInteger, List<String>, List<String>>(
                (String) results.get(0).getValue(),
                (String) results.get(1).getValue(),
                (Boolean) results.get(2).getValue(),
                (BigInteger) results.get(3).getValue(),
                convertToNative((List<Utf8String>) results.get(4).getValue()),
                convertToNative((List<Utf8String>) results.get(5).getValue()));
    }

    public void resolve(String identity, CallCallback callback) throws ContractException {
        final Function function =
                new Function(
                        FUNC_RESOLVE,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity)),
                        Arrays.<TypeReference<?>>asList(
                                new TypeReference<Utf8String>() {},
                                new TypeReference<Utf8String>() {},
                                new TypeReference<Bool>() {},
                                new TypeReference<Uint16>() {},
                                new TypeReference<DynamicArray<Utf8String>>() {},
                                new TypeReference<DynamicArray<Utf8String>>() {}));
        asyncExecuteCall(function, callback);
    }

    public TransactionReceipt updateWeId(
            String identity, String updated, List<String> authentication, List<String> service) {
        final Function function =
                new Function(
                        FUNC_UPDATEWEID,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String(updated),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray<
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String>(
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String.class,
                                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(
                                                authentication,
                                                org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String
                                                        .class)),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray<
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String>(
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String.class,
                                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(
                                                service,
                                                org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String
                                                        .class))),
                        Collections.<TypeReference<?>>emptyList(),
                        0);
        return executeTransaction(function);
    }

    public String updateWeId(
            String identity,
            String updated,
            List<String> authentication,
            List<String> service,
            TransactionCallback callback) {
        final Function function =
                new Function(
                        FUNC_UPDATEWEID,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String(updated),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray<
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String>(
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String.class,
                                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(
                                                authentication,
                                                org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String
                                                        .class)),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray<
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String>(
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String.class,
                                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(
                                                service,
                                                org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String
                                                        .class))),
                        Collections.<TypeReference<?>>emptyList(),
                        0);
        return asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForUpdateWeId(
            String identity, String updated, List<String> authentication, List<String> service) {
        final Function function =
                new Function(
                        FUNC_UPDATEWEID,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(identity),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String(updated),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray<
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String>(
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String.class,
                                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(
                                                authentication,
                                                org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String
                                                        .class)),
                                new org.fisco.bcos.sdk.v3.codec.datatypes.DynamicArray<
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String>(
                                        org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String.class,
                                        org.fisco.bcos.sdk.v3.codec.Utils.typeMap(
                                                service,
                                                org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String
                                                        .class))),
                        Collections.<TypeReference<?>>emptyList(),
                        0);
        return createSignedTransaction(function);
    }

    public Tuple4<String, String, List<String>, List<String>> getUpdateWeIdInput(
            TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function =
                new Function(
                        FUNC_UPDATEWEID,
                        Arrays.<Type>asList(),
                        Arrays.<TypeReference<?>>asList(
                                new TypeReference<Address>() {},
                                new TypeReference<Utf8String>() {},
                                new TypeReference<DynamicArray<Utf8String>>() {},
                                new TypeReference<DynamicArray<Utf8String>>() {}));
        List<Type> results =
                this.functionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple4<String, String, List<String>, List<String>>(
                (String) results.get(0).getValue(),
                (String) results.get(1).getValue(),
                convertToNative((List<Utf8String>) results.get(2).getValue()),
                convertToNative((List<Utf8String>) results.get(3).getValue()));
    }

    public MetaData weidDocuments(String param0) throws ContractException {
        final Function function =
                new Function(
                        FUNC_WEIDDOCUMENTS,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(param0)),
                        Arrays.<TypeReference<?>>asList(new TypeReference<MetaData>() {}));
        return executeCallWithSingleValueReturn(function, MetaData.class);
    }

    public void weidDocuments(String param0, CallCallback callback) throws ContractException {
        final Function function =
                new Function(
                        FUNC_WEIDDOCUMENTS,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.Address(param0)),
                        Arrays.<TypeReference<?>>asList(new TypeReference<MetaData>() {}));
        asyncExecuteCall(function, callback);
    }

    public String weids(BigInteger param0) throws ContractException {
        final Function function =
                new Function(
                        FUNC_WEIDS,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.generated.Uint256(
                                        param0)),
                        Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}));
        return executeCallWithSingleValueReturn(function, String.class);
    }

    public void weids(BigInteger param0, CallCallback callback) throws ContractException {
        final Function function =
                new Function(
                        FUNC_WEIDS,
                        Arrays.<Type>asList(
                                new org.fisco.bcos.sdk.v3.codec.datatypes.generated.Uint256(
                                        param0)),
                        Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}));
        asyncExecuteCall(function, callback);
    }

    public static WeIdContract load(
            String contractAddress, Client client, CryptoKeyPair credential) {
        return new WeIdContract(contractAddress, client, credential);
    }

    public static WeIdContract deploy(Client client, CryptoKeyPair credential)
            throws ContractException {
        return deploy(
                WeIdContract.class,
                client,
                credential,
                getBinary(client.getCryptoSuite()),
                getABI(),
                null,
                null);
    }

    public static class MetaData extends DynamicStruct {
        public String created;

        public String updated;

        public Boolean deactivated;

        public BigInteger versionId;

        public MetaData(
                Utf8String created, Utf8String updated, Bool deactivated, Uint16 versionId) {
            super(created, updated, deactivated, versionId);
            this.created = created.getValue();
            this.updated = updated.getValue();
            this.deactivated = deactivated.getValue();
            this.versionId = versionId.getValue();
        }

        public MetaData(String created, String updated, Boolean deactivated, BigInteger versionId) {
            super(
                    new org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String(created),
                    new org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String(updated),
                    new org.fisco.bcos.sdk.v3.codec.datatypes.Bool(deactivated),
                    new org.fisco.bcos.sdk.v3.codec.datatypes.generated.Uint16(versionId));
            this.created = created;
            this.updated = updated;
            this.deactivated = deactivated;
            this.versionId = versionId;
        }
    }

    public static class CreateWeIdEventResponse {
        public TransactionReceipt.Logs log;

        public String owner;

        public String created;

        public BigInteger index;
    }

    public static class DeactivateWeIdEventResponse {
        public TransactionReceipt.Logs log;

        public String owner;

        public Boolean deactivated;
    }

    public static class UpdateWeIdEventResponse {
        public TransactionReceipt.Logs log;

        public String owner;

        public String updated;

        public BigInteger versionId;
    }
}
